package com.adee.java;

import java.io.IOException;
import java.io.InputStream;

public class RuntimeDemo {
    public static void main(String[] args) throws IOException {
        Runtime rt = Runtime.getRuntime();
        Process proc = rt.exec("ipconfig");
        InputStream is = proc.getInputStream();
        byte[] bytes = new byte[1024 * 1024 * 100];
        int len = is.read(bytes);
        System.out.println(new String(bytes, 0, len, "UTF-8"));
        is.close();
    }
}
